<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: D:/Projects/MiXiM/extsrc/mixim/src/base/phyLayer/PhyUtils.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00303.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">PhyUtils.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef PHYUTILS_H_</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define PHYUTILS_H_</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;cassert&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;list&gt;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;omnetpp.h&gt;</span>
<a name="l00007"></a>00007 
<a name="l00008"></a>00008 <span class="preprocessor">#include &quot;MiXiMDefs.h&quot;</span>
<a name="l00009"></a>00009 <span class="preprocessor">#include &quot;AnalogueModel.h&quot;</span>
<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;Mapping.h&quot;</span>
<a name="l00011"></a>00011 
<a name="l00012"></a>00012 <span class="keyword">class </span><a class="code" href="a00189.html" title="This class represents the corresponding mapping to a RadioStateAnalogueModel (RSAM).">RSAMMapping</a>;
<a name="l00013"></a>00013 
<a name="l00038"></a><a class="code" href="a00182.html">00038</a> <span class="keyword">class </span>MIXIM_API <a class="code" href="a00182.html" title="This special AnalogueModel provides filtering of a Signal according to the actual RadioStates the Rad...">RadioStateAnalogueModel</a> : <span class="keyword">public</span> <a class="code" href="a00009.html" title="Interface for the analogue models of the physical layer.">AnalogueModel</a>
<a name="l00039"></a>00039 {
<a name="l00040"></a>00040   <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00189.html" title="This class represents the corresponding mapping to a RadioStateAnalogueModel (RSAM).">RSAMMapping</a>;
<a name="l00041"></a>00041   <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00188.html" title="ConstMapingIterator implementation for a RSAM.">RSAMConstMappingIterator</a>;
<a name="l00042"></a>00042 
<a name="l00043"></a>00043 <span class="keyword">protected</span>:
<a name="l00044"></a>00044 
<a name="l00051"></a><a class="code" href="a00125.html">00051</a>   <span class="keyword">class </span><a class="code" href="a00125.html" title="Data structure for the list elements.">ListEntry</a>
<a name="l00052"></a>00052   {
<a name="l00053"></a>00053   <span class="keyword">protected</span>:
<a name="l00055"></a><a class="code" href="a00125.html#a9d66461184f2716ac7d3fb5810d998d4">00055</a>     std::pair&lt;simtime_t, Argument::mapped_type&gt; <a class="code" href="a00125.html#a9d66461184f2716ac7d3fb5810d998d4" title="The pair representing the time stamp.">basicTimestamp</a>;
<a name="l00056"></a>00056 
<a name="l00057"></a>00057   <span class="keyword">public</span>:
<a name="l00059"></a><a class="code" href="a00125.html#a103b5e4c79f39b84b58341464a697d8b">00059</a>     <a class="code" href="a00125.html" title="Data structure for the list elements.">ListEntry</a>(simtime_t_cref time, Argument::mapped_type_cref value)
<a name="l00060"></a>00060       : basicTimestamp(time, value)
<a name="l00061"></a>00061     {}
<a name="l00062"></a>00062 
<a name="l00063"></a>00063     <span class="keyword">virtual</span> ~<a class="code" href="a00125.html" title="Data structure for the list elements.">ListEntry</a>() {}
<a name="l00064"></a>00064 
<a name="l00066"></a><a class="code" href="a00125.html#a7891497cd233d578f2e7ba3f01552870">00066</a>     simtime_t_cref <a class="code" href="a00125.html#a7891497cd233d578f2e7ba3f01552870" title="Returns the time of the entry.">getTime</a>()<span class="keyword"> const </span>{
<a name="l00067"></a>00067       <span class="keywordflow">return</span> basicTimestamp.first;
<a name="l00068"></a>00068     }
<a name="l00069"></a>00069 
<a name="l00071"></a><a class="code" href="a00125.html#a498d467b4ad9223646bf3c78ee2626b7">00071</a>     <span class="keywordtype">void</span> <a class="code" href="a00125.html#a498d467b4ad9223646bf3c78ee2626b7" title="Sets the time of the entry.">setTime</a>(simtime_t_cref time) {
<a name="l00072"></a>00072       basicTimestamp.first = time;
<a name="l00073"></a>00073     }
<a name="l00074"></a>00074 
<a name="l00076"></a><a class="code" href="a00125.html#ad01a32f5c87cb21f5773449a6f914fd8">00076</a>     Argument::mapped_type_cref <a class="code" href="a00125.html#ad01a32f5c87cb21f5773449a6f914fd8" title="Returns the value of the entry.">getValue</a>()<span class="keyword"> const </span>{
<a name="l00077"></a>00077       <span class="keywordflow">return</span> basicTimestamp.second;
<a name="l00078"></a>00078     }
<a name="l00079"></a>00079 
<a name="l00081"></a><a class="code" href="a00125.html#aa15158ad239ac703da7d93c77ac35e68">00081</a>     <span class="keywordtype">void</span> <a class="code" href="a00125.html#aa15158ad239ac703da7d93c77ac35e68" title="Sets the value of the entry.">setValue</a>(Argument::mapped_type_cref value) {
<a name="l00082"></a>00082       basicTimestamp.second = value;
<a name="l00083"></a>00083     }
<a name="l00084"></a>00084 
<a name="l00089"></a><a class="code" href="a00125.html#a2871467101970cb463d69dc27772994a">00089</a>     <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="a00125.html#a2871467101970cb463d69dc27772994a" title="overload of operator &lt; for class ListEntry to be able to use the STL Algorithms &quot;lower_bound&quot; and &quot;up...">operator&lt;</a>(<span class="keyword">const</span> <a class="code" href="a00125.html" title="Data structure for the list elements.">ListEntry</a>&amp; e, simtime_t_cref t) {
<a name="l00090"></a>00090       <span class="keywordflow">return</span> (e.<a class="code" href="a00125.html#a7891497cd233d578f2e7ba3f01552870" title="Returns the time of the entry.">getTime</a>() &lt; t);
<a name="l00091"></a>00091     }
<a name="l00092"></a>00092 
<a name="l00097"></a><a class="code" href="a00125.html#a17dd091fbb3d71bcb53c2324f25a695f">00097</a>     <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="a00125.html#a17dd091fbb3d71bcb53c2324f25a695f" title="overload of operator &lt; for class ListEntry to be able to use the STL Algorithms &quot;lower_bound&quot; and &quot;up...">operator&lt;</a>(simtime_t_cref t, <span class="keyword">const</span> <a class="code" href="a00125.html" title="Data structure for the list elements.">ListEntry</a>&amp; e) {
<a name="l00098"></a>00098       <span class="keywordflow">return</span> (t &lt; e.<a class="code" href="a00125.html#a7891497cd233d578f2e7ba3f01552870" title="Returns the time of the entry.">getTime</a>());
<a name="l00099"></a>00099     }
<a name="l00100"></a>00100 
<a name="l00105"></a><a class="code" href="a00125.html#a96ad143c7a58ddc09f6f2feaa41fea8c">00105</a>     <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="a00125.html#a96ad143c7a58ddc09f6f2feaa41fea8c" title="overload of operator &lt; for class ListEntry to be able to use the STL Algorithms &quot;lower_bound&quot; and &quot;up...">operator&lt;</a>(<span class="keyword">const</span> <a class="code" href="a00125.html" title="Data structure for the list elements.">ListEntry</a>&amp; left, <span class="keyword">const</span> <a class="code" href="a00125.html" title="Data structure for the list elements.">ListEntry</a>&amp; right) {
<a name="l00106"></a>00106       <span class="keywordflow">return</span> (left.<a class="code" href="a00125.html#a7891497cd233d578f2e7ba3f01552870" title="Returns the time of the entry.">getTime</a>() &lt; right.<a class="code" href="a00125.html#a7891497cd233d578f2e7ba3f01552870" title="Returns the time of the entry.">getTime</a>());
<a name="l00107"></a>00107     }
<a name="l00108"></a>00108   };
<a name="l00109"></a>00109 
<a name="l00110"></a>00110 
<a name="l00114"></a><a class="code" href="a00182.html#a576c1bc7398c256153ac9e22bbc84f61">00114</a>   <span class="keywordtype">bool</span> <a class="code" href="a00182.html#a576c1bc7398c256153ac9e22bbc84f61" title="Indicator variable whether we are currently tracking changes.">currentlyTracking</a>;
<a name="l00115"></a>00115 
<a name="l00116"></a>00116 <span class="keyword">public</span>:
<a name="l00118"></a><a class="code" href="a00182.html#a40d4abacbe1feb2cf2bbc4902f0f24e5">00118</a>   <span class="keyword">typedef</span> std::list&lt;ListEntry&gt; <a class="code" href="a00182.html#a40d4abacbe1feb2cf2bbc4902f0f24e5" title="The type to hold the attenuation&#39;s over time.">time_attenuation_collection_type</a>;
<a name="l00120"></a><a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4">00120</a>   <a class="code" href="a00182.html#a40d4abacbe1feb2cf2bbc4902f0f24e5" title="The type to hold the attenuation&#39;s over time.">time_attenuation_collection_type</a> <a class="code" href="a00182.html#a85a93fd7827eb98707f472d31e5c6fd4" title="Data structure to track the Radios attenuation over time.">radioStateAttenuation</a>;
<a name="l00121"></a>00121 
<a name="l00122"></a>00122 <span class="keyword">public</span>:
<a name="l00123"></a>00123 
<a name="l00129"></a><a class="code" href="a00182.html#a722dae61250442ba49917eceff0bdb74">00129</a>   <a class="code" href="a00182.html" title="This special AnalogueModel provides filtering of a Signal according to the actual RadioStates the Rad...">RadioStateAnalogueModel</a>( Argument::mapped_type_cref initValue
<a name="l00130"></a>00130                          , <span class="keywordtype">bool</span>                       currentlyTracking = <span class="keyword">false</span>
<a name="l00131"></a>00131                          , simtime_t_cref             initTime = SIMTIME_ZERO )
<a name="l00132"></a>00132     : <a class="code" href="a00009.html" title="Interface for the analogue models of the physical layer.">AnalogueModel</a>()
<a name="l00133"></a>00133     , currentlyTracking(currentlyTracking)
<a name="l00134"></a>00134     , radioStateAttenuation()
<a name="l00135"></a>00135   {
<a name="l00136"></a>00136     <span class="comment">// put the initial time-stamp to the list</span>
<a name="l00137"></a>00137     radioStateAttenuation.push_back(<a class="code" href="a00125.html" title="Data structure for the list elements.">ListEntry</a>(initTime, initValue));
<a name="l00138"></a>00138   }
<a name="l00139"></a>00139 
<a name="l00140"></a>00140   <span class="keyword">virtual</span> ~<a class="code" href="a00182.html" title="This special AnalogueModel provides filtering of a Signal according to the actual RadioStates the Rad...">RadioStateAnalogueModel</a>() {}
<a name="l00141"></a>00141 
<a name="l00150"></a>00150   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00009.html#a3242bc36a68dab53551d4ab1f1dab010" title="Has to be overriden by every implementation.">filterSignal</a>(airframe_ptr_t, <span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp;, <span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp;);
<a name="l00151"></a>00151 
<a name="l00155"></a><a class="code" href="a00182.html#a9a3457871c28e3e86759f70a9def9f28">00155</a>   <span class="keywordtype">void</span> <a class="code" href="a00182.html#a9a3457871c28e3e86759f70a9def9f28" title="sets tracking mode">setTrackingModeTo</a>(<span class="keywordtype">bool</span> b) {
<a name="l00156"></a>00156     currentlyTracking = b;
<a name="l00157"></a>00157   }
<a name="l00158"></a>00158 
<a name="l00168"></a>00168   <span class="keywordtype">void</span> cleanUpUntil(simtime_t_cref t);
<a name="l00169"></a>00169 
<a name="l00175"></a>00175   <span class="keywordtype">void</span> writeRecvEntry(simtime_t_cref time, Argument::mapped_type_cref value);
<a name="l00176"></a>00176 
<a name="l00177"></a>00177 };
<a name="l00178"></a>00178 <span class="comment">// end class RadioStateAnalogueModel</span>
<a name="l00179"></a>00179 
<a name="l00196"></a><a class="code" href="a00141.html">00196</a> <span class="keyword">class </span>MIXIM_API <a class="code" href="a00141.html" title="The class that represents the Radio as a state machine.">MiximRadio</a>
<a name="l00197"></a>00197 {
<a name="l00198"></a>00198 <span class="keyword">public</span>:
<a name="l00202"></a><a class="code" href="a00141.html#a5d69aacb1cf6a57827f07224219fccb7">00202</a>   <span class="keyword">enum</span> <a class="code" href="a00141.html#a5d69aacb1cf6a57827f07224219fccb7" title="The state of the radio of the nic.">RadioState</a> {
<a name="l00204"></a><a class="code" href="a00141.html#a5d69aacb1cf6a57827f07224219fccb7a2c1aea88fe8363141c138da817461953">00204</a>     RX = 0,
<a name="l00206"></a><a class="code" href="a00141.html#a5d69aacb1cf6a57827f07224219fccb7a4f6c3dfae0f5fccb76b1d42f6ccc785d">00206</a>     <a class="code" href="a00141.html#a5d69aacb1cf6a57827f07224219fccb7a4f6c3dfae0f5fccb76b1d42f6ccc785d" title="transmitting state">TX</a>,
<a name="l00208"></a><a class="code" href="a00141.html#a5d69aacb1cf6a57827f07224219fccb7afd684ca0a1c84f153dec831272ccde42">00208</a>     <a class="code" href="a00141.html#a5d69aacb1cf6a57827f07224219fccb7afd684ca0a1c84f153dec831272ccde42" title="sleeping">SLEEP</a>,
<a name="l00210"></a><a class="code" href="a00141.html#a5d69aacb1cf6a57827f07224219fccb7adb16d903144a4b227138692871b6edde">00210</a>     <a class="code" href="a00141.html#a5d69aacb1cf6a57827f07224219fccb7adb16d903144a4b227138692871b6edde" title="switching between two states">SWITCHING</a>,
<a name="l00211"></a>00211 
<a name="l00221"></a><a class="code" href="a00141.html#a5d69aacb1cf6a57827f07224219fccb7ac1eb11ffe24036a5e7c1a07035db2bba">00221</a>     NUM_RADIO_STATES
<a name="l00222"></a>00222   };
<a name="l00223"></a>00223 
<a name="l00224"></a>00224 <span class="keyword">protected</span>:
<a name="l00225"></a>00225 
<a name="l00227"></a><a class="code" href="a00141.html#a4f8c9dfcdfbc489750bef92bb96738a0">00227</a>   cOutVector <a class="code" href="a00141.html#a4f8c9dfcdfbc489750bef92bb96738a0" title="Output vector for radio states.">radioStates</a>;
<a name="l00229"></a><a class="code" href="a00141.html#a7582bf7ba1ae0ef65727f577f125eb15">00229</a>   cOutVector <a class="code" href="a00141.html#a7582bf7ba1ae0ef65727f577f125eb15" title="Output vector for radio channels.">radioChannels</a>;
<a name="l00230"></a>00230 
<a name="l00232"></a><a class="code" href="a00141.html#aa735fae8f7e81f7b3a56b651401c79d0">00232</a>   <span class="keywordtype">int</span> <a class="code" href="a00141.html#aa735fae8f7e81f7b3a56b651401c79d0" title="The current state the radio is in.">state</a>;
<a name="l00234"></a><a class="code" href="a00141.html#ae774d34df7824189236e45fd71b32f29">00234</a>   <span class="keywordtype">int</span> <a class="code" href="a00141.html#ae774d34df7824189236e45fd71b32f29" title="The state the radio is currently switching to.">nextState</a>;
<a name="l00235"></a>00235 
<a name="l00237"></a><a class="code" href="a00141.html#ab8dcd5c21a53188f161572a123058ae4">00237</a>   <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="a00141.html#ab8dcd5c21a53188f161572a123058ae4" title="The number of radio states this Radio can be in.">numRadioStates</a>;
<a name="l00239"></a><a class="code" href="a00141.html#add7d1a73e066b8c7e2bfd823fa3c80fa">00239</a>   simtime_t** <a class="code" href="a00141.html#add7d1a73e066b8c7e2bfd823fa3c80fa" title="Array for storing switch-times between states.">swTimes</a>;
<a name="l00240"></a>00240 
<a name="l00242"></a><a class="code" href="a00141.html#a891a34f0c4280d790bd6d97db8270977">00242</a>   <span class="keyword">const</span> Argument::mapped_type <a class="code" href="a00141.html#a891a34f0c4280d790bd6d97db8270977" title="Constant to store the minimum attenuation for a Radio instance.">minAtt</a>;
<a name="l00244"></a><a class="code" href="a00141.html#a26aaf48126840634a094e8223d121259">00244</a>   <span class="keyword">const</span> Argument::mapped_type <a class="code" href="a00141.html#a26aaf48126840634a094e8223d121259" title="Constant to store the maximum attenuation for a Radio instance.">maxAtt</a>;
<a name="l00245"></a>00245 
<a name="l00251"></a><a class="code" href="a00141.html#aca63047443fe045ae60a3fc13ef54b26">00251</a>   <a class="code" href="a00182.html" title="This special AnalogueModel provides filtering of a Signal according to the actual RadioStates the Rad...">RadioStateAnalogueModel</a> <a class="code" href="a00141.html#aca63047443fe045ae60a3fc13ef54b26" title="The corresponding RadioStateAnalogueModel.">rsam</a>;
<a name="l00252"></a>00252 
<a name="l00254"></a><a class="code" href="a00141.html#a077c78d3f30dc9932974a50911f18d66">00254</a>   <span class="keywordtype">int</span> <a class="code" href="a00141.html#a077c78d3f30dc9932974a50911f18d66" title="Currently selected channel (varies between 0 and nbChannels-1).">currentChannel</a>;
<a name="l00255"></a>00255 
<a name="l00257"></a><a class="code" href="a00141.html#a0b6d4eefb5e646ea73c1efe80d732391">00257</a>   <span class="keywordtype">int</span> <a class="code" href="a00141.html#a0b6d4eefb5e646ea73c1efe80d732391" title="Number of available channels.">nbChannels</a>;
<a name="l00258"></a>00258 
<a name="l00259"></a>00259 <span class="keyword">private</span>:
<a name="l00262"></a>00262   <a class="code" href="a00141.html" title="The class that represents the Radio as a state machine.">MiximRadio</a>(<span class="keyword">const</span> <a class="code" href="a00141.html" title="The class that represents the Radio as a state machine.">MiximRadio</a>&amp;);
<a name="l00265"></a>00265   <a class="code" href="a00141.html" title="The class that represents the Radio as a state machine.">MiximRadio</a>&amp; operator=(<span class="keyword">const</span> <a class="code" href="a00141.html" title="The class that represents the Radio as a state machine.">MiximRadio</a>&amp;);
<a name="l00266"></a>00266 
<a name="l00267"></a>00267 <span class="keyword">public</span>:
<a name="l00268"></a>00268 
<a name="l00279"></a><a class="code" href="a00141.html#af9b90cb1028bad49bbcc2076ff96ec3b">00279</a>   <span class="keyword">static</span> <a class="code" href="a00141.html" title="The class that represents the Radio as a state machine.">MiximRadio</a>* createNewRadio(<span class="keywordtype">bool</span> recordStats = <span class="keyword">false</span>,
<a name="l00280"></a>00280                                      <span class="keywordtype">int</span> initialState = RX,
<a name="l00281"></a>00281                                      Argument::mapped_type_cref minAtt = <a class="code" href="a00013.html#a657d962a1b965814e6b2eecb07f03e80" title="One value of a Argument value.">Argument::MappedOne</a>,
<a name="l00282"></a>00282                                      Argument::mapped_type_cref maxAtt = <a class="code" href="a00013.html#a8523627cdc70492e5e0935b9a3a78cc4" title="Zero value of a Argument value.">Argument::MappedZero</a>,
<a name="l00283"></a>00283                                      <span class="keywordtype">int</span> currentChannel=0, <span class="keywordtype">int</span> nbChannels=1)
<a name="l00284"></a>00284   {
<a name="l00285"></a>00285     <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="a00141.html" title="The class that represents the Radio as a state machine.">MiximRadio</a>(NUM_RADIO_STATES,
<a name="l00286"></a>00286                                  recordStats,
<a name="l00287"></a>00287                                  initialState,
<a name="l00288"></a>00288                                  minAtt, maxAtt,
<a name="l00289"></a>00289                                  currentChannel, nbChannels);
<a name="l00290"></a>00290   }
<a name="l00291"></a>00291 
<a name="l00295"></a>00295   <span class="keyword">virtual</span> ~<a class="code" href="a00141.html" title="The class that represents the Radio as a state machine.">MiximRadio</a>();
<a name="l00296"></a>00296 
<a name="l00306"></a>00306   <span class="keyword">virtual</span> simtime_t switchTo(<span class="keywordtype">int</span> newState, simtime_t_cref now);
<a name="l00307"></a>00307 
<a name="l00313"></a>00313   <span class="keyword">virtual</span> <span class="keywordtype">void</span> setSwitchTime(<span class="keywordtype">int</span> from, <span class="keywordtype">int</span> to, simtime_t_cref time);
<a name="l00314"></a>00314 
<a name="l00318"></a><a class="code" href="a00141.html#a234ab13c02b2b3ca369f9b18aace0e44">00318</a>   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a00141.html#a234ab13c02b2b3ca369f9b18aace0e44" title="Returns the state the Radio is currently in.">getCurrentState</a>()<span class="keyword"> const </span>{
<a name="l00319"></a>00319     <span class="keywordflow">return</span> state;
<a name="l00320"></a>00320   }
<a name="l00321"></a>00321 
<a name="l00331"></a>00331   <span class="keyword">virtual</span> <span class="keywordtype">void</span> endSwitch(simtime_t_cref now);
<a name="l00332"></a>00332 
<a name="l00339"></a><a class="code" href="a00141.html#a6adb7b66381adb5e7914e79c94fda6fe">00339</a>   <span class="keyword">virtual</span> <a class="code" href="a00182.html" title="This special AnalogueModel provides filtering of a Signal according to the actual RadioStates the Rad...">RadioStateAnalogueModel</a>* <a class="code" href="a00141.html#a6adb7b66381adb5e7914e79c94fda6fe" title="Returns a pointer to the RadioStateAnalogueModel.">getAnalogueModel</a>() {
<a name="l00340"></a>00340     <span class="keywordflow">return</span> (&amp;rsam);
<a name="l00341"></a>00341   }
<a name="l00342"></a>00342 
<a name="l00347"></a><a class="code" href="a00141.html#ab7612ad466891148d016c34cb6c639dd">00347</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00141.html#ab7612ad466891148d016c34cb6c639dd" title="discards information in the RadioStateAnalogueModel before given time-point">cleanAnalogueModelUntil</a>(simtime_t_cref t) {
<a name="l00348"></a>00348     rsam.cleanUpUntil(t);
<a name="l00349"></a>00349   }
<a name="l00350"></a>00350 
<a name="l00354"></a><a class="code" href="a00141.html#ababfbdc6756083fa034c65cc474289b6">00354</a>   <span class="keywordtype">void</span> <a class="code" href="a00141.html#ababfbdc6756083fa034c65cc474289b6" title="sets tracking mode">setTrackingModeTo</a>(<span class="keywordtype">bool</span> b) {
<a name="l00355"></a>00355     rsam.setTrackingModeTo(b);
<a name="l00356"></a>00356   }
<a name="l00357"></a>00357 
<a name="l00364"></a><a class="code" href="a00141.html#ad98b2835fa230f9d042329c37aee89ef">00364</a>   <span class="keywordtype">void</span> <a class="code" href="a00141.html#ad98b2835fa230f9d042329c37aee89ef" title="Changes the current channel of the radio.">setCurrentChannel</a>(<span class="keywordtype">int</span> newChannel) {
<a name="l00365"></a>00365     assert(newChannel &gt; -1);
<a name="l00366"></a>00366     assert(newChannel &lt; nbChannels);
<a name="l00367"></a>00367     currentChannel = newChannel;
<a name="l00368"></a>00368     radioChannels.record(currentChannel);
<a name="l00369"></a>00369   }
<a name="l00370"></a>00370 
<a name="l00375"></a><a class="code" href="a00141.html#a6b1bfd335fd212c52c65eeb6a36b0851">00375</a>   <span class="keywordtype">int</span> <a class="code" href="a00141.html#a6b1bfd335fd212c52c65eeb6a36b0851" title="Returns the channel the radio is currently set to.">getCurrentChannel</a>()<span class="keyword"> const </span>{
<a name="l00376"></a>00376     <span class="keywordflow">return</span> currentChannel;
<a name="l00377"></a>00377   }
<a name="l00378"></a>00378 
<a name="l00383"></a><a class="code" href="a00141.html#ae0550827a03c3a0a5dd10c8957e5e014">00383</a>   <span class="keywordtype">int</span> <a class="code" href="a00141.html#ae0550827a03c3a0a5dd10c8957e5e014" title="Returns the number of channels.">getNbChannels</a>()<span class="keyword"> const </span>{
<a name="l00384"></a>00384     <span class="keywordflow">return</span> nbChannels;
<a name="l00385"></a>00385   }
<a name="l00386"></a>00386 
<a name="l00387"></a>00387 <span class="keyword">protected</span>:
<a name="l00403"></a>00403   <a class="code" href="a00141.html" title="The class that represents the Radio as a state machine.">MiximRadio</a>(<span class="keywordtype">int</span> numRadioStates,
<a name="l00404"></a>00404       <span class="keywordtype">bool</span> recordStats,
<a name="l00405"></a>00405       <span class="keywordtype">int</span> initialState = RX,
<a name="l00406"></a>00406       Argument::mapped_type_cref minAtt = <a class="code" href="a00013.html#a657d962a1b965814e6b2eecb07f03e80" title="One value of a Argument value.">Argument::MappedOne</a>, Argument::mapped_type_cref maxAtt = <a class="code" href="a00013.html#a8523627cdc70492e5e0935b9a3a78cc4" title="Zero value of a Argument value.">Argument::MappedZero</a>,
<a name="l00407"></a>00407       <span class="keywordtype">int</span> currentChannel = 0, <span class="keywordtype">int</span> nbChannels = 1);
<a name="l00408"></a>00408 
<a name="l00412"></a><a class="code" href="a00141.html#aef828c78b65e04eb308929880d2ac8f7">00412</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> makeRSAMEntry(simtime_t_cref time, <span class="keywordtype">int</span> state)
<a name="l00413"></a>00413   {
<a name="l00414"></a>00414     rsam.writeRecvEntry(time, mapStateToAtt(state));
<a name="l00415"></a>00415   }
<a name="l00416"></a>00416 
<a name="l00421"></a><a class="code" href="a00141.html#a8fb94b6085e7ee54877407a111755fc1">00421</a>   <span class="keyword">virtual</span> Argument::mapped_type_cref mapStateToAtt(<span class="keywordtype">int</span> state)
<a name="l00422"></a>00422   {
<a name="l00423"></a>00423     <span class="keywordflow">if</span> (state == RX) {
<a name="l00424"></a>00424       <span class="keywordflow">return</span> minAtt;
<a name="l00425"></a>00425     }
<a name="l00426"></a>00426     <span class="keywordflow">else</span> {
<a name="l00427"></a>00427       <span class="keywordflow">return</span> maxAtt;
<a name="l00428"></a>00428     }
<a name="l00429"></a>00429   }
<a name="l00430"></a>00430 };
<a name="l00431"></a>00431 <span class="comment">// end class MiximRadio</span>
<a name="l00432"></a>00432 
<a name="l00438"></a><a class="code" href="a00188.html">00438</a> <span class="keyword">class </span>MIXIM_API <a class="code" href="a00188.html" title="ConstMapingIterator implementation for a RSAM.">RSAMConstMappingIterator</a> : <span class="keyword">public</span> <a class="code" href="a00059.html" title="Defines an const iterator for a ConstMapping which is able to iterate over the Mapping.">ConstMappingIterator</a>
<a name="l00439"></a>00439 {
<a name="l00440"></a>00440 <span class="keyword">protected</span>:
<a name="l00441"></a>00441 
<a name="l00443"></a><a class="code" href="a00188.html#aad2e47c90690500114b0715ac93fdea0">00443</a>   <span class="keyword">const</span> <a class="code" href="a00182.html" title="This special AnalogueModel provides filtering of a Signal according to the actual RadioStates the Rad...">RadioStateAnalogueModel</a>* <a class="code" href="a00188.html#aad2e47c90690500114b0715ac93fdea0" title="Pointer to the RSAM module.">rsam</a>;
<a name="l00444"></a>00444 
<a name="l00446"></a><a class="code" href="a00188.html#af50e95907f71f9fba359cb559549cef3">00446</a>   RadioStateAnalogueModel::time_attenuation_collection_type::const_iterator <a class="code" href="a00188.html#af50e95907f71f9fba359cb559549cef3" title="List iterator pointing to the current position.">it</a>;
<a name="l00447"></a>00447 
<a name="l00449"></a><a class="code" href="a00188.html#a9039bc33a7d35f7fefa980d1bc48ad5f">00449</a>   <a class="code" href="a00013.html" title="Defines an argument for a mapping.">Argument</a> <a class="code" href="a00188.html#a9039bc33a7d35f7fefa980d1bc48ad5f" title="The current position of this iterator.">position</a>;
<a name="l00451"></a><a class="code" href="a00188.html#a926d1e5571f715a515233de3f245dea2">00451</a>   <a class="code" href="a00013.html" title="Defines an argument for a mapping.">Argument</a> <a class="code" href="a00188.html#a926d1e5571f715a515233de3f245dea2" title="The next position the iterator will jump to.">nextPosition</a>;
<a name="l00452"></a>00452 
<a name="l00454"></a><a class="code" href="a00188.html#a44e62faddab1436a85e70e80d00080ab">00454</a>   simtime_t <a class="code" href="a00188.html#a44e62faddab1436a85e70e80d00080ab" title="The start time of the signal this iterators mapping attenuates.">signalStart</a>;
<a name="l00456"></a><a class="code" href="a00188.html#a1f51b46c71a890d8331afb993bf1cc54">00456</a>   simtime_t <a class="code" href="a00188.html#a1f51b46c71a890d8331afb993bf1cc54" title="The end time of the signal this iterators mapping attenuates.">signalEnd</a>;
<a name="l00457"></a>00457 
<a name="l00458"></a>00458 <span class="keyword">private</span>:
<a name="l00461"></a>00461   <a class="code" href="a00188.html" title="ConstMapingIterator implementation for a RSAM.">RSAMConstMappingIterator</a>(<span class="keyword">const</span> <a class="code" href="a00188.html" title="ConstMapingIterator implementation for a RSAM.">RSAMConstMappingIterator</a>&amp;);
<a name="l00464"></a>00464   <a class="code" href="a00188.html" title="ConstMapingIterator implementation for a RSAM.">RSAMConstMappingIterator</a>&amp; <a class="code" href="a00059.html#a7518b144224ce8cacd2f2aae17501b5f" title="ConstMappingIterator assignment operator.">operator=</a>(<span class="keyword">const</span> <a class="code" href="a00188.html" title="ConstMapingIterator implementation for a RSAM.">RSAMConstMappingIterator</a>&amp;);
<a name="l00465"></a>00465 
<a name="l00466"></a>00466 <span class="keyword">public</span>:
<a name="l00467"></a>00467 
<a name="l00469"></a>00469   <a class="code" href="a00188.html" title="ConstMapingIterator implementation for a RSAM.">RSAMConstMappingIterator</a>(<span class="keyword">const</span> <a class="code" href="a00182.html" title="This special AnalogueModel provides filtering of a Signal according to the actual RadioStates the Rad...">RadioStateAnalogueModel</a>* rsam,
<a name="l00470"></a>00470                simtime_t_cref signalStart,
<a name="l00471"></a>00471                simtime_t_cref signalEnd);
<a name="l00472"></a>00472 
<a name="l00473"></a>00473   <span class="keyword">virtual</span> ~<a class="code" href="a00188.html" title="ConstMapingIterator implementation for a RSAM.">RSAMConstMappingIterator</a>() {}
<a name="l00474"></a>00474 
<a name="l00481"></a>00481   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00059.html#ae3cdbe2115d0e87af0da549b675f2bf8" title="Lets the iterator point to the passed position.">jumpTo</a>(<span class="keyword">const</span> <a class="code" href="a00013.html" title="Defines an argument for a mapping.">Argument</a>&amp; pos);
<a name="l00482"></a>00482 
<a name="l00493"></a>00493   <span class="keyword">virtual</span> <span class="keywordtype">void</span> setNextPosition();
<a name="l00494"></a>00494 
<a name="l00500"></a><a class="code" href="a00188.html#a3a34a4fb1e22f7e0bbac13e21d08415e">00500</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00188.html#a3a34a4fb1e22f7e0bbac13e21d08415e" title="Lets the iterator point to the begin of the function.">jumpToBegin</a>() {
<a name="l00501"></a>00501     <a class="code" href="a00059.html#ae3cdbe2115d0e87af0da549b675f2bf8" title="Lets the iterator point to the passed position.">jumpTo</a>(signalStart);
<a name="l00502"></a>00502   }
<a name="l00503"></a>00503 
<a name="l00508"></a>00508   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00059.html#a607d741e2d841265851a85670f247c46" title="Iterates to the specified position. This method should be used if the new position is near the curren...">iterateTo</a>(<span class="keyword">const</span> <a class="code" href="a00013.html" title="Defines an argument for a mapping.">Argument</a>&amp; pos);
<a name="l00509"></a>00509 
<a name="l00516"></a><a class="code" href="a00188.html#a919ae04b93ed239dc2f5566a383f28d4">00516</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00188.html#a919ae04b93ed239dc2f5566a383f28d4" title="Iterates to the next position of the function.">next</a>() {
<a name="l00517"></a>00517     <a class="code" href="a00059.html#a607d741e2d841265851a85670f247c46" title="Iterates to the specified position. This method should be used if the new position is near the curren...">iterateTo</a>(nextPosition);
<a name="l00518"></a>00518   }
<a name="l00519"></a>00519 
<a name="l00527"></a>00527   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="a00059.html#a4a6348a453418da95978e570fec046fc" title="Returns true if the current position of the iterator is in range of the function.">inRange</a>() <span class="keyword">const</span>;
<a name="l00528"></a>00528 
<a name="l00533"></a>00533   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="a00059.html#ad4bac7233c154b7086c6124d2e21be49" title="Returns true if the iterator has a next value it can iterate to on a call to &quot;next()&quot;.">hasNext</a>() <span class="keyword">const</span>;
<a name="l00534"></a>00534 
<a name="l00538"></a><a class="code" href="a00188.html#af465b20a9a50c6640289e7f53f26134d">00538</a>   <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="a00013.html" title="Defines an argument for a mapping.">Argument</a>&amp; <a class="code" href="a00188.html#af465b20a9a50c6640289e7f53f26134d" title="Returns the current position of the iterator.">getPosition</a>()<span class="keyword"> const </span>{
<a name="l00539"></a>00539     <span class="keywordflow">return</span> position;
<a name="l00540"></a>00540   }
<a name="l00541"></a>00541 
<a name="l00542"></a><a class="code" href="a00188.html#a35441df57b5a398c15aefd4696ac9e44">00542</a>   <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="a00013.html" title="Defines an argument for a mapping.">Argument</a>&amp; <a class="code" href="a00188.html#a35441df57b5a398c15aefd4696ac9e44" title="Returns the position the next call to &quot;next()&quot; of this Iterator would iterate to.">getNextPosition</a>()<span class="keyword"> const </span>{
<a name="l00543"></a>00543     <span class="keywordflow">return</span> nextPosition;
<a name="l00544"></a>00544   }
<a name="l00545"></a>00545 
<a name="l00550"></a><a class="code" href="a00188.html#a59275f8855f0bda32e25116da54dcd2f">00550</a>   <span class="keyword">virtual</span> argument_value_t <a class="code" href="a00188.html#a59275f8855f0bda32e25116da54dcd2f" title="Returns the value of the function at the current position.">getValue</a>()<span class="keyword"> const </span>{
<a name="l00551"></a>00551     <span class="keywordflow">return</span> it-&gt;getValue();
<a name="l00552"></a>00552   }
<a name="l00553"></a>00553 
<a name="l00558"></a>00558   <span class="keyword">virtual</span> <span class="keywordtype">void</span> iterateToOverZeroSwitches(simtime_t_cref t);
<a name="l00559"></a>00559 
<a name="l00560"></a>00560 }; <span class="comment">// end class RSAMConstMappingIterator</span>
<a name="l00561"></a>00561 
<a name="l00578"></a><a class="code" href="a00189.html">00578</a> <span class="keyword">class </span>MIXIM_API <a class="code" href="a00189.html" title="This class represents the corresponding mapping to a RadioStateAnalogueModel (RSAM).">RSAMMapping</a> : <span class="keyword">public</span> <a class="code" href="a00058.html" title="Represents a not changeable mapping (mathematical function) from domain with at least the time to a A...">ConstMapping</a>
<a name="l00579"></a>00579 {
<a name="l00580"></a>00580 <span class="keyword">protected</span>:
<a name="l00581"></a>00581 
<a name="l00583"></a><a class="code" href="a00189.html#a1e968e40c9c6d55ef033aea16dc7cc92">00583</a>   <span class="keyword">const</span> <a class="code" href="a00182.html" title="This special AnalogueModel provides filtering of a Signal according to the actual RadioStates the Rad...">RadioStateAnalogueModel</a>* <a class="code" href="a00189.html#a1e968e40c9c6d55ef033aea16dc7cc92" title="Pointer to the RSAM module.">rsam</a>;
<a name="l00585"></a><a class="code" href="a00189.html#a83073d619992a38be77157eeaa8de677">00585</a>   simtime_t <a class="code" href="a00189.html#a83073d619992a38be77157eeaa8de677" title="Start of the signal this mapping defines attenuation for.">signalStart</a>;
<a name="l00587"></a><a class="code" href="a00189.html#ac4a1ed01e6319d66ada6b7bab12ce93f">00587</a>   simtime_t <a class="code" href="a00189.html#ac4a1ed01e6319d66ada6b7bab12ce93f" title="End of the signal this mapping defines attenuation for.">signalEnd</a>;
<a name="l00588"></a>00588 
<a name="l00589"></a>00589 <span class="keyword">public</span>:
<a name="l00593"></a><a class="code" href="a00189.html#af06c2c7d0de01d46127f12a4d43d3617">00593</a>   <a class="code" href="a00189.html" title="This class represents the corresponding mapping to a RadioStateAnalogueModel (RSAM).">RSAMMapping</a>(<span class="keyword">const</span> <a class="code" href="a00189.html" title="This class represents the corresponding mapping to a RadioStateAnalogueModel (RSAM).">RSAMMapping</a>&amp; o)
<a name="l00594"></a>00594     : <a class="code" href="a00058.html" title="Represents a not changeable mapping (mathematical function) from domain with at least the time to a A...">ConstMapping</a>(o)
<a name="l00595"></a>00595     , rsam(o.rsam)
<a name="l00596"></a>00596     , signalStart(o.signalStart)
<a name="l00597"></a>00597     , signalEnd(o.signalEnd)
<a name="l00598"></a>00598   { }
<a name="l00599"></a>00599 
<a name="l00606"></a><a class="code" href="a00189.html#afd82b76846eaeea2ac5ac06255770258">00606</a>   <a class="code" href="a00189.html" title="This class represents the corresponding mapping to a RadioStateAnalogueModel (RSAM).">RSAMMapping</a>&amp; <a class="code" href="a00189.html#afd82b76846eaeea2ac5ac06255770258" title="RSAMMapping assignment operator.">operator=</a>(<span class="keyword">const</span> <a class="code" href="a00189.html" title="This class represents the corresponding mapping to a RadioStateAnalogueModel (RSAM).">RSAMMapping</a>&amp; copy) {
<a name="l00607"></a>00607     <a class="code" href="a00189.html" title="This class represents the corresponding mapping to a RadioStateAnalogueModel (RSAM).">RSAMMapping</a> tmp(copy);
<a name="l00608"></a>00608 
<a name="l00609"></a>00609     <a class="code" href="a00058.html#a473df8fa0aa441ca1adb356b17b1f59f" title="Swaps data with another ConstMapping.">swap</a>(tmp);
<a name="l00610"></a>00610     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00611"></a>00611   }
<a name="l00612"></a>00612 
<a name="l00621"></a><a class="code" href="a00189.html#a61ee1608b52cd975bffe1350f468a4cb">00621</a>   <span class="keywordtype">void</span> <a class="code" href="a00189.html#a61ee1608b52cd975bffe1350f468a4cb" title="Swaps data with another RSAMMapping.">swap</a>(<a class="code" href="a00189.html" title="This class represents the corresponding mapping to a RadioStateAnalogueModel (RSAM).">RSAMMapping</a>&amp; s) {
<a name="l00622"></a>00622     <a class="code" href="a00058.html#a473df8fa0aa441ca1adb356b17b1f59f" title="Swaps data with another ConstMapping.">ConstMapping::swap</a>(s);
<a name="l00623"></a>00623     std::swap(rsam,        s.<a class="code" href="a00189.html#a1e968e40c9c6d55ef033aea16dc7cc92" title="Pointer to the RSAM module.">rsam</a>);
<a name="l00624"></a>00624     std::swap(signalStart, s.<a class="code" href="a00189.html#a83073d619992a38be77157eeaa8de677" title="Start of the signal this mapping defines attenuation for.">signalStart</a>);
<a name="l00625"></a>00625     std::swap(signalEnd,   s.<a class="code" href="a00189.html#ac4a1ed01e6319d66ada6b7bab12ce93f" title="End of the signal this mapping defines attenuation for.">signalEnd</a>);
<a name="l00626"></a>00626   }
<a name="l00627"></a>00627 
<a name="l00628"></a>00628 <span class="keyword">public</span>:
<a name="l00633"></a><a class="code" href="a00189.html#acec9b66637a97c81d45a073f622bf9ee">00633</a>   <a class="code" href="a00189.html" title="This class represents the corresponding mapping to a RadioStateAnalogueModel (RSAM).">RSAMMapping</a>(<span class="keyword">const</span> <a class="code" href="a00182.html" title="This special AnalogueModel provides filtering of a Signal according to the actual RadioStates the Rad...">RadioStateAnalogueModel</a>* rsam,
<a name="l00634"></a>00634         simtime_t_cref signalStart,
<a name="l00635"></a>00635         simtime_t_cref signalEnd) :
<a name="l00636"></a>00636     <a class="code" href="a00058.html" title="Represents a not changeable mapping (mathematical function) from domain with at least the time to a A...">ConstMapping</a>(),
<a name="l00637"></a>00637     rsam(rsam),
<a name="l00638"></a>00638     signalStart(signalStart),
<a name="l00639"></a>00639     signalEnd(signalEnd)
<a name="l00640"></a>00640   {
<a name="l00641"></a>00641     assert(rsam);
<a name="l00642"></a>00642     assert( !(signalStart &lt; rsam-&gt;radioStateAttenuation.front().getTime()) );
<a name="l00643"></a>00643   }
<a name="l00644"></a>00644 
<a name="l00645"></a>00645   <span class="keyword">virtual</span> ~<a class="code" href="a00189.html" title="This class represents the corresponding mapping to a RadioStateAnalogueModel (RSAM).">RSAMMapping</a>() {}
<a name="l00646"></a>00646 
<a name="l00656"></a>00656   <span class="keyword">virtual</span> argument_value_t <a class="code" href="a00058.html#afabbd15bb8f50e45901f99633d0a47c9" title="Returns the value of this Mapping at the position specified by the passed Argument.">getValue</a>(<span class="keyword">const</span> <a class="code" href="a00013.html" title="Defines an argument for a mapping.">Argument</a>&amp; pos) <span class="keyword">const</span>;
<a name="l00657"></a>00657 
<a name="l00662"></a><a class="code" href="a00189.html#a0c4471fe51b34fab8f93b644326c1862">00662</a>   <span class="keyword">virtual</span> <a class="code" href="a00059.html" title="Defines an const iterator for a ConstMapping which is able to iterate over the Mapping.">ConstMappingIterator</a>* <a class="code" href="a00058.html#a5ff3a15fe6d536fa7a26a3fe1ff1b274" title="Returns a pointer of a new Iterator which is able to iterate over this Mapping.">createConstIterator</a>()<span class="keyword"> const</span>
<a name="l00663"></a>00663 <span class="keyword">  </span>{
<a name="l00664"></a>00664     <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="a00188.html" title="ConstMapingIterator implementation for a RSAM.">RSAMConstMappingIterator</a>(rsam, signalStart, signalEnd);
<a name="l00665"></a>00665   }
<a name="l00666"></a>00666 
<a name="l00672"></a>00672   <span class="keyword">virtual</span> <a class="code" href="a00059.html" title="Defines an const iterator for a ConstMapping which is able to iterate over the Mapping.">ConstMappingIterator</a>* <a class="code" href="a00058.html#a5ff3a15fe6d536fa7a26a3fe1ff1b274" title="Returns a pointer of a new Iterator which is able to iterate over this Mapping.">createConstIterator</a>(<span class="keyword">const</span> <a class="code" href="a00013.html" title="Defines an argument for a mapping.">Argument</a>&amp; pos) <span class="keyword">const</span>;
<a name="l00673"></a>00673 
<a name="l00674"></a><a class="code" href="a00189.html#a7b47c38b2b2c98e251db268c9fe4ce6d">00674</a>   <span class="keyword">virtual</span> <a class="code" href="a00058.html" title="Represents a not changeable mapping (mathematical function) from domain with at least the time to a A...">ConstMapping</a>* <a class="code" href="a00189.html#a7b47c38b2b2c98e251db268c9fe4ce6d" title="returns a deep copy of this mapping instance.">constClone</a>()<span class="keyword"> const </span>{
<a name="l00675"></a>00675     <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="a00189.html" title="This class represents the corresponding mapping to a RadioStateAnalogueModel (RSAM).">RSAMMapping</a>(*<span class="keyword">this</span>);
<a name="l00676"></a>00676   }
<a name="l00677"></a>00677 
<a name="l00678"></a>00678 }; <span class="comment">// end class RSAMMapping</span>
<a name="l00679"></a>00679 
<a name="l00680"></a>00680 
<a name="l00681"></a>00681 <span class="preprocessor">#endif </span><span class="comment">/*PHYUTILS_H_*/</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>PhyUtils.h</b>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:30 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
